From: Paul Eggert Date: Thu, 23 Jun 2011 07:37:31 +0000 (-0700) Subject: Merge from trunk. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~844^2~845^2~429 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=7efb4e0e62ed3e11e20d15821342c322b4101ae7;p=emacs.git Merge from trunk. --- 7efb4e0e62ed3e11e20d15821342c322b4101ae7 diff --cc src/ChangeLog index 7948766690f,c7fd7ef5b9d..1a26efbd34f --- a/src/ChangeLog +++ b/src/ChangeLog @@@ -1,49 -1,10 +1,56 @@@ +2011-06-23 Paul Eggert + ++ Integer and buffer overflow fixes (Bug#8873). ++ + * print.c (printchar, strout): Check for string overflow. + (PRINTPREPARE, printchar, strout): + Don't set size unless allocation succeeds. + + * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int, + for sizes. Check for string overflow more accurately. + Simplify newline removal at end; this suppresses a GCC 4.6.0 warning. + + * macros.c: Integer and buffer overflow fixes. + * keyboard.h (struct keyboard.kbd_macro_bufsize): + * macros.c (Fstart_kbd_macro, store_kbd_macro_char): + Use ptrdiff_t, not int, for sizes. + Don't increment bufsize until after realloc succeeds. + Check for size-calculation overflow. + (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result. + + * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling. + + * lread.c: Integer overflow fixes. + (read_integer): Radix is now EMACS_INT, not int, + to improve quality of diagnostics for out-of-range radices. + Calculate buffer size correctly for out-of-range radices. + (read1): Check for integer overflow in radices, and in + read-circle numbers. + (read_escape): Avoid int overflow. + (Fload, openp, read_buffer_size, read1) + (substitute_object_recurse, read_vector, read_list, map_obarray): + Use ptrdiff_t, not int, for sizes. + (read1): Use EMACS_INT, not int, for sizes. + Check for size overflow. + + * image.c (cache_image): Check for size arithmetic overflow. + - 2011-06-22 Paul Eggert - + * lread.c: Integer overflow issues. + (saved_doc_string_size, saved_doc_string_length) + (prev_saved_doc_string_size, prev_saved_doc_string_length): + Now ptrdiff_t, not int. + (read1): Don't assume doc string length fits in int. Check for + out-of-range doc string lengths. + (read_list): Don't assume file position fits in int. + (read_escape): Check for hex character overflow. + + 2011-06-22 Leo Liu + + * minibuf.c (Fcompleting_read_default, Vcompleting_read_function): + Move to minibuffer.el. + + 2011-06-22 Paul Eggert + Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking. The following patches are for when GLYPH_DEBUG && !XASSERT. * dispextern.h (trace_redisplay_p, dump_glyph_string):